package util.designpattern.dependenceinversionprinciple20200619;

public class StydyCourseTest {

    public static void main(String[] args) {
//        Smile smile = new Smile();
//        smile.studyJavaCource();
//        smile.studyPythonCourse();

            //依赖注入
//        Smile smile = new Smile();
//        smile.study(new JavaCourse());
//        smile.study(new PythonCourse());
            //构造注入
            Smile smile = new Smile(new JavaCourse());
            Smile smile1 = new Smile(new PythonCourse());

            //setter方式注入
    }
}
